Improve Debug Logs#224
Merged
Merged
Conversation
CatarinaGamboa
requested changes
May 14, 2026
| if (!enabled()) { | ||
| return; | ||
| } | ||
| System.out.println(SMT_TAG + " unsimplified: " + predicate); |
Collaborator
There was a problem hiding this comment.
dont use the smt_tag for simplification, create a SIM or SPL tag with another color to indicate what phase we are showing. Also use Unsimplified with uppercase
| if (!enabled() || counterexample == null || counterexample.assignments().isEmpty()) { | ||
| return; | ||
| } | ||
| System.out.println(SMT_TAG + " unfiltered counterexample assignments:"); |
| System.out.println(SMT_TAG + " " + formatConclusion(conclusion)); | ||
| } | ||
|
|
||
| public static void simplificationInput(Predicate predicate) { |
Collaborator
There was a problem hiding this comment.
javadoc? also change the function name, since this is printing the unsimplified version it makes little sense to call it simplificationInput in this file - i get it from where it comes from but its not very meaningful
| System.out.println(SMT_TAG + " unsimplified: " + predicate); | ||
| } | ||
|
|
||
| public static void counterexampleAssignments(Counterexample counterexample) { |
| } | ||
|
|
||
| public ValDerivationNode simplify(Context context) { | ||
| DebugLog.simplificationInput(this); |
Collaborator
There was a problem hiding this comment.
we should print both unsimplified and simplified predicates one next to the other so its easier to see the changes in the debug info
Collaborator
Author
CatarinaGamboa
approved these changes
May 14, 2026
| if (!enabled()) { | ||
| return; | ||
| } | ||
| System.out.println(SMP_TAG + " Simplified " + Colors.CYAN + input + Colors.RESET + " to " + Colors.YELLOW |
Collaborator
There was a problem hiding this comment.
we might want this in two lines if its very big so its easier to parse
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
This PR makes it so instead of skipping the expression simplification in debug mode, it logs the unsimplified predicate and runs the simplification like normal. It also does the same for the counterexamples.
Example
Related Issue
None.
Type of change
Checklist
liquidjava-example/src/main/java/testSuite/(Correct*/Error*)mvn testpasses locally